<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用JSX语法</title>
    <script src="./node_modules/react/umd/react.development.js"></script>
    <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
    <script src="./node_modules/@babel/standalone/babel.min.js"></script>
    <div id="box"></div>
    <script type="text/babel">
        let count = 100
        let item = <React.Fragment>
            <div className="item">
                <h2 className="title">金榜题名</h2>
                <p>总数：{count}</p>
                <input type="text" placeholder="请输入内容" />
                <hr/>
                <br/>
                <ul className="list">
                    <li>1.赵武</li>
                    <li style={{color:'red',fontSize:20}}>2.帐算</li>
                    <li>3.前四</li>
                </ul>
            </div>

        </React.Fragment>
        let root = ReactDOM.createRoot(document.getElementById('box'))
        //5.把虚拟dom渲染到页面
        root.render(item)
        console.log('111',item)
        console.log('222',document.getElementById('box'))
    </script>
</head>
<body>
    
</body>
</html>